package com.promfy.timetable.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
 
public class ReminderDBOpenHelper extends SQLiteOpenHelper {
	
	private static final String NAME = "reminders.db";
	private static final int VERSION = 1;
	

	public ReminderDBOpenHelper(Context context) {
		super(context, NAME, null, VERSION);
	}
  
	@Override
	public void onCreate(SQLiteDatabase db) {
		String sql = "CREATE TABLE IF NOT EXISTS reminders (" +
		"_id integer PRIMARY KEY autoincrement" +
		",time varchar(20)" +
		",content BLOB" +
		",status INTEGER" +
		")";
			 
		db.execSQL(sql); 

	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		db.execSQL("DROP TABLE IF EXISTS reminders");
		onCreate(db);
	}

}
